<?php
namespace app\model;
class Member extends Common
{
    const MEMBER_AUDIT_STATUS_NOT_VERIFY = 1;
    const MEMBER_AUDIT_STATUS_APPENDING = 2;
    const MEMBER_AUDIT_STATUS_SUCCESS = 3;
    const MEMBER_AUDIT_STATUS_FAIL = 4;
    const MEMBER_STATUS_ACTIVE = 1;
    const MEMBER_STATUS_INACTIVE = -1;
    protected $createTime = 'register_at';
    public function setPasswdAttr($password)
    {
        return password_hash($password,PASSWORD_DEFAULT);
    }
    public function setTradePasswdAttr($password)
    {
        return password_hash($password,PASSWORD_DEFAULT);
    }

    public function memberCoins()
    {
        return $this->hasMany(MemberCoin::class,"member_id",'id');
    }
}